MSVC changes from Gerhard.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 7 Jan 2014 21:59:17 +0000 (21:59 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 7 Jan 2014 21:59:17 +0000 (21:59 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4717 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/GPSBabel.pro
gpsbabel/README.magnav [deleted file]
gpsbabel/csv_util.cc
gpsbabel/deprecated/README.magnav [new file with mode: 0644]
gpsbabel/shapelib/README.GPSBabel
gpsbabel/shapelib/shpopen.c

index 2f6e2db0baee4d1da0183323886b9b1217ccafd8..eafe9c4b11a57cdec991ce6ffa6c4ad4f5a72778 100644 (file)
@@ -39,14 +39,14 @@ DEPRECIATED_SHAPE=pdbfile.cc
 FILTERS=position.cc radius.cc duplicate.cc arcdist.cc polygon.cc smplrout.cc \
         reverse_route.cc sort.cc stackfilter.cc trackfilter.cc discard.cc \
         nukedata.cc interpolate.cc transform.cc height.cc swapdata.cc bend.cc \
-               validate.cc
+        validate.cc
 
-SHAPE=shapelib/shpopen.c shapelib/dbfopen.c
+SHAPE=shapelib/shpopen.c shapelib/dbfopen.c shapelib/safileio.c
 
 ZLIB=zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/inffast.c \
         zlib/inflate.c zlib/infback.c zlib/inftrees.c zlib/trees.c \
-       zlib/uncompr.o zlib/gzlib.o zlib/gzclose.o zlib/gzread.o \
-        zlib/gzwrite.o zlib/zutil.o
+        zlib/uncompr.c zlib/gzlib.c zlib/gzclose.c zlib/gzread.c \
+        zlib/gzwrite.c zlib/zutil.c
 
 JEEPS += jeeps/gpsapp.cc jeeps/gpscom.cc \
          jeeps/gpsmath.cc jeeps/gpsmem.cc  \
@@ -263,6 +263,7 @@ win32 {
 
 win32-msvc*{
   DEFINES += _CRT_SECURE_NO_DEPRECATE
+  INCLUDEPATH += ../../src/core src/core
   QMAKE_CXXFLAGS += /MP -wd4100
   TEMPLATE=vcapp
 }
@@ -282,6 +283,8 @@ macx {
 
 SOURCES += $$ALL_FMTS $$FILTERS $$SUPPORT $$SHAPE $$ZLIB $$JEEPS
 
+DEFINES += NEW_STRINGS
+
 # We don't care about stripping things out of the build.  Full monty, baby.
 DEFINES += MAXIMAL_ENABLED
 DEFINES += FILTERS_ENABLED
diff --git a/gpsbabel/README.magnav b/gpsbabel/README.magnav
deleted file mode 100644 (file)
index c0cf42e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Translating NAV Companion waypoints to another format is as easy
-as with any other format.  Just find the Companion_Waypoints database
-in your palm backup directory and use it as the input file. 
-
-When translating waypoints back to NAV Companion, though, you need 
-to jump through some hoops:  
-
-First, you must merge any waypoints that already exist in the database 
-in your Palm Backup directory with the ones you are adding; failure to 
-do so will result in only the new points being available in NAV Companion, 
-even if you give the new database a different name (it will overwrite 
-the old database, even in your backup directory.  That's a feature of 
-PalmOS, not of NAV Companion.)  
-
-To merge the databases, use a command line like the following:
-
-gpsbabel -i magnav -f Companion_Waypoints.PDB -i geo -f geocaching.loc -o magnav -F merged.pdb
-
-Second, you must use the installer to install your new PDB file.  Don't
-make the mistake of copying it over the existing Companion_Waypoints.PDB
-file; the one on the handheld will overwrite it rather than merging with
-it.
-
-Finally, because NAV Companion is not designed to work with desktop 
-applications, you must tell NAV Companion that its waypoints database 
-has changed out from under it.  One way to do this is to go to the 
-waypoints screen and attempt to scroll; that will force it to reread 
-the database and fix the record pointers that it keeps on the heap.
index c21f7c5bdc10c55d96f78e67ff2f3e5933537cee..e6e9136b108e5e3c1f98b36928936bf7ac9228ff 100644 (file)
@@ -1709,11 +1709,12 @@ xcsv_waypt_pr(const waypoint* wpt)
     }
     break;
     case XT_SHORTNAME:
-      writebuff(buff, fmp->printfc,
 #if NEW_STRINGS
+               writebuff(buff, fmp->printfc,
                 shortname.isEmpty() ? fmp->val : CSTR(shortname));
 #else
-                (shortname && *shortname) ? shortname : fmp->val);
+               writebuff(buff, fmp->printfc,
+                       (shortname && *shortname) ? shortname : fmp->val);
 #endif
       break;
     case XT_ANYNAME:
@@ -1758,11 +1759,12 @@ xcsv_waypt_pr(const waypoint* wpt)
 #endif
       break;
     case XT_DESCRIPTION:
-      writebuff(buff, fmp->printfc,
 #if NEW_STRINGS
+               writebuff(buff, fmp->printfc,
                 description.isEmpty() ? fmp->val : CSTR(description));
 #else
-                (description && *description) ? description : fmp->val);
+               writebuff(buff, fmp->printfc,
+                       (description && *description) ? description : fmp->val);
 #endif
       break;
     case XT_NOTES:
diff --git a/gpsbabel/deprecated/README.magnav b/gpsbabel/deprecated/README.magnav
new file mode 100644 (file)
index 0000000..c0cf42e
--- /dev/null
@@ -0,0 +1,28 @@
+Translating NAV Companion waypoints to another format is as easy
+as with any other format.  Just find the Companion_Waypoints database
+in your palm backup directory and use it as the input file. 
+
+When translating waypoints back to NAV Companion, though, you need 
+to jump through some hoops:  
+
+First, you must merge any waypoints that already exist in the database 
+in your Palm Backup directory with the ones you are adding; failure to 
+do so will result in only the new points being available in NAV Companion, 
+even if you give the new database a different name (it will overwrite 
+the old database, even in your backup directory.  That's a feature of 
+PalmOS, not of NAV Companion.)  
+
+To merge the databases, use a command line like the following:
+
+gpsbabel -i magnav -f Companion_Waypoints.PDB -i geo -f geocaching.loc -o magnav -F merged.pdb
+
+Second, you must use the installer to install your new PDB file.  Don't
+make the mistake of copying it over the existing Companion_Waypoints.PDB
+file; the one on the handheld will overwrite it rather than merging with
+it.
+
+Finally, because NAV Companion is not designed to work with desktop 
+applications, you must tell NAV Companion that its waypoints database 
+has changed out from under it.  One way to do this is to go to the 
+waypoints screen and attempt to scroll; that will force it to reread 
+the database and fix the record pointers that it keeps on the heap.
index 3fb125c8a9aabd480d2eafdb12ee8e715a4eb501..8e4fe5eac1b5bb4b798e03bf0f5ea7c3ca5c2c84 100644 (file)
@@ -5,3 +5,4 @@ the amount of size in our tree that it takes and to reduce ongoing
 merge maintenance.
 
 shpopen.c: int32_t instead of int32 was used to eliminate clang warnings.
+shpopen.c: include <stdint.h> for MSVC.
index 1fc196a415979e58b0c18514415e020310d8ab39..480c1b8a443cab07cfcf4b829a5c5fa201a8bba2 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+// GPSBabel-local: add stdint for MSVC.
+#include <stdint.h>
 
 SHP_CVSID("$Id: shpopen.c,v 1.73 2012-01-24 22:33:01 fwarmerdam Exp $")